<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>xaxis</title>
  </head>
  <body bgcolor="#FFFFFF">
    <center>Scilab Function</center>
    <div align="right">Last update : April 1993</div>
    <p>
      <b>xaxis</b> -  draw an axis</p>
    <h3>
      <font color="blue">Calling Sequence</font>
    </h3>
    <dl>
      <dd>
        <tt>xaxis(alpha,nsteps,size,init)  </tt>
      </dd>
    </dl>
    <h3>
      <font color="blue">Parameters</font>
    </h3>
    <ul>
      <li>
        <tt>
          <b>alpha</b>
        </tt>: real, slope in degree of the axis.</li>
      <li>
        <tt>
          <b>nsteps</b>
        </tt>: real vector of size 2, number of big and small intervals.</li>
      <li>
        <tt>
          <b>size</b>
        </tt>: real vector of size 3, size of the small intervals, and small and big tics.</li>
      <li>
        <tt>
          <b>init</b>
        </tt>: real vector of size 2, origin of the axis.</li>
    </ul>
    <h3>
      <font color="blue">Description</font>
    </h3>
    <p>
      <tt>
        <b>xaxis</b>
      </tt> draws an axis.</p>
    <p>
    The direction of the axis is given by
    <tt>
        <b>alpha</b>
      </tt> in degree.</p>
    <p>
      <tt>
        <b>init=[x0 y0]</b>
      </tt> is the initial point of the axis.</p>
    <p>
      <tt>
        <b>nsteps=[n1,n2]</b>
      </tt> gives the 
    number of big and small intervals separated by tics.</p>
    <p>
      <tt>
        <b>size=[s1,s2,c1]</b>
      </tt> where <tt>
        <b>s1</b>
      </tt> gives 
    the size of the small intervals, <tt>
        <b>s2</b>
      </tt> gives the size of the small tics 
    along the axis and 
    <tt>
        <b>s2*c1</b>
      </tt> gives the size of the big tics. All the sizes are given using the
    current x-scale and y-scale and are given as dimensions along the drawn axis.</p>
    <pre>

            example : n1=3, n2=2, alpha=0
                    (s2*c1) 
            |     (s2)   |            |           |
            |______|_____|_____|______|_____|_____|
               s1
   
    </pre>
    <h3>
      <font color="blue">Examples</font>
    </h3>
    <pre>

x=[-%pi:0.1:%pi]';
// plot without axis
plot2d(x,sin(x),1,"010"," ",[-4 -1 4 1])
// draw x axis
xpoly([-4 4],[0 0],"lines")
xaxis(0,[2 2],[2 0.1 3],[-4 0])
xstring(-4.1,-0.25,"-4"); xstring(-0.2,-0.1,"0"); xstring(4,-0.25,"4")
// draw y axis
xpoly([0 0],[-1 1],"lines")
xaxis(90,[2 2],[0.5 0.025 3],[0 1])
xstring(-0.5,-1.05,"-1"); xstring(-0.35,0.95,"1")
 
  </pre>
    <h3>
      <font color="blue">Author</font>
    </h3>
    <p>J.Ph.C.  </p>
  </body>
</html>
